go to card short name of this background of background "About"
unlock screen with zoom close
else if menuItem is "Home" then
if the optionKey is not down then
resetCards
end if
restoreMenuBar
go home
else if menuItem contains "Quit" then
if the optionKey is not down then
resetCards
end if
restoreMenuBar false
go to card "Mac School® Shell"
unlock screen with zoom close
else if menuItem is "New Bin" then
repeat with index = 1 to 4
set hilite of background button index to false
if not visible of background button index then
show background button index
show background field (index + 4)
show background field index
put "0" into background field (index + 4)
put "Bin " & the long time into background field index
set hilite of background button index to true
set lockText of background field index to false
add 1 to background field "Bins"
put 0.0 into bg field id ((index * 3) + 14)
put "Omit" into bg field id ((index * 3) + 15)
put 0.0 into bg field id ((index * 3) + 16)
repeat with count = 1 to 8
put "Omit" into bg field id ((index * 8) + count + 20)
end repeat
unlock screen
select text of background field index
put menuItem into it
exit doMenu
end if
end repeat
else if menuItem is "New Task" then
repeat with index = 1 to 3
if not visible of card field index then
if index = 1 then
put "is " & index & " task" into card field "Number of Tasks"
else
put "are " & index & " tasks" into card field "Number of Tasks"
end if
repeat with count = 1 to 4
if short name of this card is background field count then
put index into background field (count + 4)
end if
end repeat
show card field index
put "Task " & the long time into card field index
add 1 to background field "Tasks"
put 0.0 into card field id ((index * 5) + 1)
put 0 into card field id ((index * 5) + 2)
put "Omit" into card field id ((index * 5) + 3)
put 0.0 into card field id ((index * 5) + 4)
put 0.0 into card field id ((index * 5) + 5)
repeat with count = 1 to 5
put "Omit" into card field id ((index * 5) + count + 15)
end repeat
unlock screen
select text of card field index
put menuItem into it
exit doMenu
end if
end repeat
else if menuItem is "Open…" then
repeat with index = 1 to 4
if hilite of background button index then
set cursor to watch
repeat with index = 1 to the number of bg fields
put bg field index into item index of array
end repeat
go to card background field index of this background
if the result is empty then
repeat with index = 1 to the number of bg fields
put item index of array into bg field index
end repeat
unlock screen with zoom open
set hilite of background button index to false
else unlock screen
set cursor to hand
exit doMenu
end if
end repeat
else if menuItem is "Report Cards" then
if the optionKey is not down then
resetCards
end if
restoreMenuBar false
go to background "Report Cards"
else if menuItem is "Clear" then
repeat with index = 1 to 4
if hilite of background button index then
subtract 1 from background field "Bins"
repeat with count1 = (index + 1) to 4
if visible of background button count1 then
put bg field count1 into bg field (count1 - 1)
put bg field (count1 + 4) into bg field (count1 + 3)
put bg field id ((count1 * 3) + 14) into bg field id (((count1 - 1) * 3) + 14)
put bg field id ((count1 * 3) + 15) into bg field id (((count1 - 1) * 3) + 15)
put bg field id ((count1 * 3) + 16) into bg field id (((count1 - 1) * 3) + 16)
repeat with count2 = 1 to 8
put bg field id ((count1 * 8) + count2 + 20) into bg field id (((count1 - 1) * 8) + count2 + 20)
end repeat
else
hide background button (count1 - 1)
hide background field (count1 + 3)
hide background field (count1 - 1)
put empty into bg field id (((count1 - 1) * 3) + 14)
put empty into bg field id (((count1 - 1) * 3) + 15)
put empty into bg field id (((count1 - 1) * 3) + 16)
repeat with count2 = 1 to 8
put empty into bg field id (((count1 - 1) * 8) + count2 + 20)
end repeat
exit repeat
end if
end repeat
if index = 4 OR count1 = 4 then
hide background button 4
hide background field 8
hide background field 4
put empty into bg field id 26
put empty into bg field id 27
put empty into bg field id 28
repeat with count2 = 1 to 8
put empty into bg field id (count2 + 52)
end repeat
end if
exit repeat
end if
end repeat
else if menuItem is "Automatic Calculation" then
getMenuMark 1093,1
if the result is 0 then checkMenuItem 1093,1,true
else checkMenuItem 1093,1,false
else if menuItem is "Screen" then
checkMenuItem 1094,1,true
checkMenuItem 1094,2,false
else if menuItem is "Printer" then
checkMenuItem 1094,1,false
checkMenuItem 1094,2,true
else if menuItem is "Students…" OR menuItem is "Special Marks…" OR menuItem is "Class Details…" OR menuItem is "Letter Grades…" OR menuItem is "Consolidation…" OR menuItem is "Term Marks…" OR menuItem is "Sort…" OR menuItem is "Task Statistics" OR menuItem is "Student Report…" OR menuItem is "Term Report…" then
push card
go to card menuItem of this background
end if
unlock screen
end doMenu
on resetCards
set cursor to watch
repeat with index = 1 to 4
if visible of background button index then
hide background button index
hide background field (index + 4)
hide background field index
end if
end repeat
go to first card of this background
put 0 into background field "Bins"
put 0 into background field "Tasks"
put 0.0 into background field "Sum"
put "Omit" into background field "Average"
repeat with index = 17 to 60
put empty into background field id index
end repeat
repeat with index = 61 to 68
put "0.0" into background field id index
end repeat
repeat with index = 69 to 76
put empty into background field id index
end repeat
go to next card of this background -- Assignments
repeat with index = 3 to 5
hide card field id index
end repeat
repeat with index = 6 to 35
put empty into card field id index
end repeat
put "are 0 tasks" into card field "Number of Tasks"
go to next card of this background -- Exams
repeat with index = 3 to 5
hide card field id index
end repeat
repeat with index = 6 to 35
put empty into card field id index
end repeat
put "are 0 tasks" into card field "Number of Tasks"
go to next card of this background -- Term 1 Mark
repeat with index = 3 to 5
hide card field id index
end repeat
repeat with index = 6 to 35
put empty into card field id index
end repeat
put "are 0 tasks" into card field "Number of Tasks"
end resetCards
-- part 1 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=143 top=56 right=92 bottom=181
-- title width / last selected line: 0
-- icon id / first selected line: 5041 / 5041
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseDown
if not hilite of me then
repeat with index = 1 to 4
set hilite of background button index to false
end repeat
set hilite of me to true
else
lock screen
set cursor to watch
repeat with index = 1 to the number of bg fields
put bg field index into item index of array
end repeat
go to card background field the number of me of this background
if the result is empty then
repeat with index = 1 to the number of bg fields
put item index of array into bg field index
end repeat
unlock screen with zoom open
set hilite of me to false
else unlock screen
set cursor to hand
end if
end mouseDown
-- part 2 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=215 top=56 right=92 bottom=253
-- title width / last selected line: 0
-- icon id / first selected line: 5041 / 5041
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseDown
if not hilite of me then
repeat with index = 1 to 4
set hilite of background button index to false
end repeat
set hilite of me to true
else
lock screen
set cursor to watch
repeat with index = 1 to the number of bg fields
put bg field index into item index of array
end repeat
go to card background field the number of me of this background
if the result is empty then
repeat with index = 1 to the number of bg fields
put item index of array into bg field index
end repeat
unlock screen with zoom open
set hilite of me to false
else unlock screen
set cursor to hand
end if
end mouseDown
-- part 3 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=287 top=56 right=92 bottom=325
-- title width / last selected line: 0
-- icon id / first selected line: 5041 / 5041
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseDown
if not hilite of me then
repeat with index = 1 to 4
set hilite of background button index to false
end repeat
set hilite of me to true
else
lock screen
set cursor to watch
repeat with index = 1 to the number of bg fields
put bg field index into item index of array
end repeat
go to card background field the number of me of this background
if the result is empty then
repeat with index = 1 to the number of bg fields
put item index of array into bg field index
end repeat
unlock screen with zoom open
set hilite of me to false
else unlock screen
set cursor to hand
end if
end mouseDown
-- part 4 (button)
-- low flags: 80
-- high flags: 0000
-- rect: left=359 top=56 right=92 bottom=397
-- title width / last selected line: 0
-- icon id / first selected line: 5041 / 5041
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
----- HyperTalk script -----
on mouseDown
if not hilite of me then
repeat with index = 1 to 4
set hilite of background button index to false
end repeat
set hilite of me to true
else
lock screen
set cursor to watch
repeat with index = 1 to the number of bg fields
put bg field index into item index of array
end repeat
go to card background field the number of me of this background
if the result is empty then
repeat with index = 1 to the number of bg fields
put item index of array into bg field index
end repeat
unlock screen with zoom open
set hilite of me to false
else unlock screen
set cursor to hand
end if
end mouseDown
-- part 5 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=128 top=92 right=117 bottom=197
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseUp
set lockText of me to false
select text of me
end mouseUp
on closeField
set lockText of me to true
set hilite of background button the number of me to false
select empty
end closeField
-- part 6 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=200 top=92 right=117 bottom=269
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseUp
set lockText of me to false
select text of me
end mouseUp
on closeField
set lockText of me to true
set hilite of background button the number of me to false
select empty
end closeField
-- part 7 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=272 top=92 right=117 bottom=341
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseUp
set lockText of me to false
select text of me
end mouseUp
on closeField
set lockText of me to true
set hilite of background button the number of me to false
select empty
end closeField
-- part 8 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=344 top=92 right=117 bottom=413
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseUp
set lockText of me to false
select text of me
end mouseUp
on closeField
set lockText of me to true
set hilite of background button the number of me to false
select empty
end closeField
-- part 9 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=148 top=66 right=79 bottom=169
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseDown
send "mouseDown" to background button (id of me - 8)
end mouseDown
-- part 10 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=220 top=66 right=79 bottom=241
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseDown
send "mouseDown" to background button (id of me - 8)
end mouseDown
-- part 11 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=292 top=66 right=79 bottom=313
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseDown
send "mouseDown" to background button (id of me - 8)
end mouseDown
-- part 12 (field)
-- low flags: 81
-- high flags: 0000
-- rect: left=364 top=66 right=79 bottom=385
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 3
-- text size: 9
-- style flags: 256
-- line height: 12
-- part name:
----- HyperTalk script -----
on mouseDown
send "mouseDown" to background button (id of me - 8)
end mouseDown
-- part 13 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=462 top=55 right=68 bottom=490
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Students
-- part 14 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=462 top=71 right=84 bottom=490
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Bins
-- part 15 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=462 top=87 right=100 bottom=490
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Tasks
-- part 16 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=445 top=119 right=134 bottom=481
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name: Sum
-- part 17 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=127 top=119 right=134 bottom=198
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on closeField
put bg field 13 + bg field 16 + bg field 19 + bg field 22 into temp
put temp & ".0" into bg field "Sum"
if background field id 69 is empty then
repeat with index = 61 to 68
put "Omit" into background field id index
end repeat
repeat with index = 69 to 76
put "n/a" into background field id index
end repeat
end if
end closeField
-- part 18 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=127 top=135 right=150 bottom=198
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on closeField
put empty into temp
put empty into count
repeat with index = 1 to 4
if bg field ((index - 1) * 4) + 18) <> "Omit" then
add bg field ((index - 1) * 4) + 18) to temp
add one to count
end if
end repeat
if temp <> empty then put (temp / count) & ".0" into bg field "Average"
end closeField
-- part 19 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=127 top=151 right=166 bottom=198
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
-- part 20 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=199 top=119 right=134 bottom=270
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on closeField
put bg field 13 + bg field 16 + bg field 19 + bg field 22 into temp
put temp & ".0" into bg field "Sum"
end closeField
-- part 21 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=199 top=135 right=150 bottom=270
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
-- part 22 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=199 top=151 right=166 bottom=270
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
-- part 23 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=271 top=119 right=134 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on closeField
put bg field 13 + bg field 16 + bg field 19 + bg field 22 into temp
put temp & ".0" into bg field "Sum"
end closeField
-- part 24 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=271 top=135 right=150 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
-- part 25 (field)
-- low flags: 01
-- high flags: 0000
-- rect: left=271 top=151 right=166 bottom=342
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
-- part 26 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=343 top=119 right=134 bottom=414
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 9
-- style flags: 0
-- line height: 12
-- part name:
----- HyperTalk script -----
on closeField
put bg field 13 + bg field 16 + bg field 19 + bg field 22 into temp